package cn.mesmile.design.builder;

/**
 * @author zb
 * @date 2020/11/15 15:18
 * @Description:
 */
public class Main {

    /**
     * 核心组成
     *
     *  Builder：抽象建造者，定义多个通用方法和构建方法
     *  ConcreteBuilder：具体建造者，可以有多个
     *  Director：指挥者，控制整个组合过程，将需求交给建造者，由建造者去创建对象
     *  Product：产品角色
     *
     */

    public static void main(String[] args) {

        Director director = new Director();

        Computer computer = director.create(new LowComputerBuilder());


        Computer computer2 = director.create(new HighComputerBuilder());

        System.out.println("computer = " + computer);

        System.out.println("computer2 = " + computer2);


    }
}
